﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ProductAttributeInfoConfig : EntityTypeConfiguration<ProductAttributeInfo>
    {
        public ProductAttributeInfoConfig()
        {
            ToTable("Himall_ProductAttributes");
            HasRequired(x => x.AttributesInfo).WithMany(x => x.ProductAttributesInfo).HasForeignKey(x => x.AttributeId);
            HasRequired(x => x.ProductsInfo).WithMany(x => x.ProductAttributeInfo).HasForeignKey(x => x.ProductId);
        }
    }
}
